package org.eclipse.football;

import static org.junit.Assert.*;

import org.junit.Test;

public class InsertTeam {

	@Test
	public void test() {
		// Create a league
		League league = new League("does_not_exist.txt");
		
		// Create a team
		Team team = new Team("team","user");
		
		// Get number of teams in league
		int old_size = league.getTeams().size();
		
		// Try to add team to league
		league.addTeam(team);
		
		// Make sure number of teams increased by 1
		assertTrue(!(league.getTeams().size() != old_size + 1));
//		if(league.getTeams().size() != old_size + 1){
//			// If not then fail
//			fail("Could not add team to league");
//		}
		
		//make sure username is correct
		assertTrue(team.getUsername().equals("user"));
//		if(!team.getUsername().equals("user")){
//			fail("User name incorect");
//		}
	}
}
